package cn.fintecher.pangolin.service.business.model.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;

/**
 * @Auther: xiaqun
 * @Description: 查询工单请求参数
 * @Date: 14:56 2019/10/12
 */

@Data
public class FindWorkOrderRequest {
    @ApiModelProperty(value = "案件ID")
    private String caseId;

    public BoolQueryBuilder getBuilder() {
        BoolQueryBuilder builder = new BoolQueryBuilder();
        builder.must(QueryBuilders.matchPhraseQuery("caseId.keyword", this.caseId));
        return builder;
    }
}
